package com.itheima;

public class Test {
    public static void main(String[] args) {
        Employee[] employees = new Employee[3];
        employees[0] = new Employee(1, "张三", 5000, 25);
        employees[1] = new Employee(2, "李四", 6000, 26);
        employees[2] = new Employee(3, "王五", 7000, 27);
        for (int i = 0; i < employees.length; i++) {
            System.out.println(employees[i]);
        }
        Teacher t = new Teacher(1, "张三", 5000, 25, "数学");
        Consultant c = new Consultant(1, "张三", 5000, 25, "java");
        System.out.println(t);
        System.out.println(c);
    }
}
